package pers.vic.base.bo.system;

import java.io.Serializable;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.annotation.JsonProperty;
import pers.vic.base.annoation.AttachmentFlag;
import pers.vic.base.annoation.AttachmentFlag.AttachmenType;
import pers.vic.base.handle.convert.AttachmentSingleConver;

/**
 * 系统用户表 实体类
 * 
 * @author VIC
 */
public class SysUser implements Serializable {

	private static final long serialVersionUID = 1L;

	/**
	 * id;1;
	 */
	private Integer id;

	/**
	 * 用户名;1;1;
	 */
	private String username;

	/**
	 * 昵称;1;1;
	 */
	private String nickname;

	/**
	 * 密码;1;
	 */
	private String password;

	/**
	 * 头像;2;
	 */
	@JsonSerialize(using = AttachmentSingleConver.class)
	@AttachmentFlag(AttachmenType.SIGN)
	private Integer portrait;

	/**
	 * 状态;5;0-禁用,1-启用;1;
	 */
	private Integer enabled;

	/**
	 * 标记删除;5;0-否,1-是;1;
	 */
	private Integer isDelete;

	/**
	 * 创建时间;6;
	 */
	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	private Date createTime;

	
	
	
	public SysUser(Integer id, Integer enabled) {
		super();
		this.id = id;
		this.enabled = enabled;
	}

	public SysUser() {
		super();
	}

	/**
	 * set：id;1;
	 */
	public SysUser setId(Integer id) {
		this.id = id;
		return this;
	}

	/**
	 * get：id;1;
	 */
	public Integer getId() {
		return id;
	}

	/**
	 * set：用户名;1;1;
	 */
	public void setUsername(String username) {
		this.username = username;
	}

	/**
	 * get：用户名;1;1;
	 */
	public String getUsername() {
		return username;
	}

	/**
	 * set：昵称;1;1;
	 */
	public void setNickname(String nickname) {
		this.nickname = nickname;
	}

	/**
	 * get：昵称;1;1;
	 */
	public String getNickname() {
		return nickname;
	}

	/**
	 * set：密码;1;
	 */
	public SysUser setPassword(String password) {
		this.password = password;
		return this;
	}

	/**
	 * get：密码;1;
	 */
	public String getPassword() {
		return password;
	}

	/**
	 * set：头像;2;
	 */
	public void setPortrait(Integer portrait) {
		this.portrait = portrait;
	}

	/**
	 * get：头像;2;
	 */
	@JsonProperty("PortraitUrl")
	public Integer getPortrait() {
		return portrait;
	}

	/**
	 * set：状态;5;0-禁用,1-启用;1;
	 */
	public void setEnabled(Integer enabled) {
		this.enabled = enabled;
	}

	/**
	 * get：状态;5;0-禁用,1-启用;1;
	 */
	public Integer getEnabled() {
		return enabled;
	}

	/**
	 * set：标记删除;5;0-否,1-是;1;
	 */
	public void setIsDelete(Integer isDelete) {
		this.isDelete = isDelete;
	}

	/**
	 * get：标记删除;5;0-否,1-是;1;
	 */
	public Integer getIsDelete() {
		return isDelete;
	}

	/**
	 * set：创建时间;6;
	 */
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	/**
	 * get：创建时间;6;
	 */
	public Date getCreateTime() {
		return createTime;
	}
}
